package cn.iocoder.yudao.module.erp.dal.mysql.business.order.ordermethod;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.erp.controller.admin.business.order.ordermethod.vo.OrderMethodPageReqVO;
import cn.iocoder.yudao.module.erp.dal.dataobject.business.order.ordermethod.OrderMethodDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 结算方式 Mapper
 *
 * @author yy
 */
@Mapper
public interface OrderMethodMapper extends BaseMapperX<OrderMethodDO> {

    default PageResult<OrderMethodDO> selectPage(OrderMethodPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OrderMethodDO>()
                .likeIfPresent(OrderMethodDO::getName, reqVO.getName())
                .betweenIfPresent(OrderMethodDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(OrderMethodDO::getId));
    }

}